﻿using System;
using System.Text;

namespace Bpms.Log
{
    public class ExceptionLogAdapter : LogAdapter
    {
        private log4net.ILog log;

        public override void WriteLog(string message)
        {
            WriteLog(message, (Exception)null);
        }

        public override void WriteLog(string message, Exception exception)
        {
            log = log4net.LogManager.GetLogger("Exception");
            if (log.IsDebugEnabled)
            {
                log.Debug(message, exception);
            }
            log = null;
        }
    }
}
